[XEN] Various softirq cleanups. Main one is to always
call smp_processor_id() after any softirq, as rescheduling
may cause us to move to another processor on ia64
(spotted by Isaku Yamahata). Also get rid of many direct
callers of do_softirq() by creating new function
process_pending_timers(). Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM][SVM] Don't BUG when VMRUN exitcode==-1, just crash the domain.
If there's any consistency problems in the VMCB, the VMRUN will return
an exitcode of -1 to indicate that the guest-state is "bad". Prior to
this change, it would cause the hypervisor to reboot. This is not at
all necessary - the VMCB may be bad, but the system is most likely
still intact. [In particular, a guest could cause a crash of the
system by setting up PAE with an invalid set of PDPE's, which is
definitely not a desired behaviour]
Now also print out the VMCB, as that MAY help identify the cause of
the exitcode of -1.
evtchn_do_upcall() has a micro optimization which is depends on that xchg is a barrier.
However xchg of IA64 has acquire semantics so that event
channel notification is lost sometimes. This patch fixes it.
Replace my previous patch with equivalent fix from linux-2.6.17.
Might as well stay as close to that as we can... Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
[XM] When two or more domain parameters are given, the xm reboot
command doesn't give a command error. This problem is also
included in the xm shutdown command.
This patch checks on domain parameter. If two or more domain
parameters are given, the command error occurs.
[XEN] Work around timeout bug in old Linux kernels where
timeout would erroneously be set far out in the future. Signed-off-by: Keir Fraser <keir@xensource.com>
Fail save if we have an out-of-sync P2M/M2P (since otherwise the restore
will fail later).
A better fix would be to tolerate temporary out-of-sync situations so we
can make a nicer fix to the kunmap_atomic() iossue (c/f -unstable csets
10529 & 10533) but this requires some more thought.
Replace changesets 10521, 10526, and 10527 with this new version that does not
use xml.marshal.
This patch adds new xm subcommands to support working with resource
labels. The new subcommands are 'xm resources', 'xm rmlabel', 'xm
getlabel' and 'xm dry-run'. In addition, the 'xm addlabel' subcommand
now uses an updated syntax to support labeling both domains and
resources. See the xm man page for details on each subcommand.
Beyond the new subcommands, this patch allows users to immediately see
when security checks will fail by pushing some basic security checking
into the beginning of 'xm create' and 'xm block-attach'. ACM security
attributes for block devices are added to XenStore in order to support
the final security enforcement, which will be performed in the kernel
and included in a separate patch.
Signed-off-by: Bryan D. Payne <bdpayne@us.ibm.com> Signed-off-by: Reiner Sailer <sailer@us.ibm.com>
Fix the kunmap_atomic() change in 10529:4260eb8c08740de0000081c61a6237ffcb95b2d5.
Mustn't zap the PTE if the virtual address is not in kmap_atomic range! Signed-off-by: Keir Fraser <keir@xensource.com>
Fix next_timer_interrupt() in patch and update caller
to deal with the case of existing pending timers.
Fixes a dom0 hang at boot time on some HPs where some
dubious USB code is invoked from pci_init() that
potentially calls msleep(10) a few times. Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
Use address types in elf parser that match elf headers.
Necessary if a long is a different size to addresses in elf
file being parsed.
From: Jimi Xenidis <jimix@watson.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
kunmap_atomic() must zap the PTE to avoid dangling references
when attempting to free memory back to Xen. We can implement
something more efficient in future.
Also add debug print message if guest tries to free 'in use'
memory. We'll make it a real guest-visible error in future.
[TPM] Add 3 more test cases to the xm testsuite that extend the
state of a PCR register and test that the value remains the same during
a suspend/resume cycle and during live and non-live local migration.
The patch adapts existing tests to the changes in the driver (moving of
the sysfs entry). Some problems with existing tests are fixed.
[TPM] Add an upgrade patch to bring TPM subsystem to 2.6.17-rc4.
This patch adds the updated and newer driver plugins appearing in
2.6.17-rc4 to the 2.6.16.13 kernel. The patch needs to be placed into
the patches/linux-2.6.16.13 directory and should be removed once an
upgrade is done to 2.6.17-rc4 or later version.
[TPM] Update the TPM drivers in the repository to a newer version
and also fixes the following:
- a problem introduced by a recent change to the xenbus_driver structure
requires driver-specific data to be stored in another data structures
- removes the #define'd MIN by min/min_t
- moves the sysfs entry to /sys/devices/xen/<vtpm-%d>
- fixes a bug occurring during cancellation of requests
- updates the default configuration to also compile the TPM V1.2 driver
submitted in part 2 of this patch
- all changes made to the generic TPM driver are surrounded by #ifdef
CONFIG_XEN's.
[XEN] BUG() places console in sync mode.
Also move the BUG code out of line.
Original patch from Jimi Xenidis. Signed-off-by: Keir Fraser <keir@xensource.com>
This patch adds new xm subcommands to support working with resource
labels. The new subcommands are 'xm resources', 'xm rmlabel', 'xm
getlabel' and 'xm dry-run'. In addition, the 'xm addlabel' subcommand
now uses an updated syntax to support labeling both domains and
resources. See the xm man page for details on each subcommand.
Beyond the new subcommands, this patch allows users to immediately see
when security checks will fail by pushing some basic security checking
into the beginning of 'xm create' and 'xm block-attach'. ACM security
attributes for block devices are added to XenStore in order to support
the final security enforcement, which will be performed in the kernel
and included in a separate patch.
Signed-off-by: Bryan D. Payne <bdpayne@us.ibm.com> Signed-off-by: Reiner Sailer <sailer@us.ibm.com>
[HVM][Firmware] Make the creation of MP tables more dynamic
Currently the ROMBIOS includes static MP tables for only four
configurations: 1-way, 2-way, 4-way, and 8-way.
This patch makes the creation of MP tables more dynamic by creating them
from within HVMLOADER based upon the VCPU number provided by the HVM
information table.
Note: Some of the information included used to create the MP tables is
still hard coded and based upon values used in the original ROMBIOS MP
tables. Data such as the CPU family/model/stepping information should
probably be made to match the information provided to the guest when
executing a CPUID.
[XEND] Have the parent id logged in the log file, this is very useful when
debugging xend as it has multiple processes, and it can be hard to
work out which one is doing what without this information.
This patch adds TCP Segmentation Offload (TSO) support to the backend.
It also advertises this fact through xenbus so that the frontend can
detect this and send through TSO requests only if it is supported.
This is done using an extra request slot which is indicated by a flag
in the first slot. In future checksum offload can be done in the same
way.
The extra request slot must not be generated if the backend does not
support the appropriate feature bits. For now this is simply feature-tso.
If the frontend detects the presence of the appropriate feature bits,
it may generate TX requests which have the appropriate request flags
set that indicates the presence of an extra request slot with the extra
information.
On the backend the extra request slot is read if and only if the request
flags are set in the TX request.
This protocol allows more feature bits to be added in future without
breaking compatibility. At least the hardware checksum bit is planned.
Even though only TSO is supported for now the code actually supports
GSO so it can be applied to any other protocol. The only missing bit
is the detection of host support for a specific GSO protocol. Once that
is added we can advertise all supported protocols to the guest.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Keir Fraser <keir@xensource.com>
The location is 'statistics' directory under each VBD directory, for
example, /sys/devices/xen-backend/vbd-x-xxxx/statistics.
The 'statistics' directory includes the following three statistical
information:
oo_req
is the number of requests held up due to full pipeline.
rd_req
is the number of processed READ requests.
wr_req
is the number of processed WRITE requests.
[XENTOP] Adds batch mode processing option (output to stdout)
to the xentop utility. It also adds the ability to specify the
number of iterations xentop should produce before exiting.
a) xentop -b
will output to stdout.
b) xentop -i <number>
will iterate <number> times and exit (option "n" is already used by
xentop. Hence the choice of "i"). This option can be used for both the
curses and batch modes.
[LINUX] Fix a few compile warnings and memory leaks in the sysfs driver.
Also clean up the general allocate-call-free idiom that is used
throughout the file. Signed-off-by: Keir Fraser <keir@xensource.com>
[LINUX][BLKBACK] Support temporary disconnection from frontend. Signed-off-by: Steven Smith <sos22@cam.ac.uk> Signed-off-by: Keir Fraser <keir@xensource.com>
[LINUX] Allow dma_alloc_coherent() to work for regions up to 2MB.
The previous limit of 0.5MB was insufficient for some drivers
(e.g., when loading firmware). Signed-off-by: Keir Fraser <keir@xensource.com>
[BALLOON] Make the domain0 ballooning logic in xend aware of pages that are on the page scrub list.
This fixes the case where crashing/restarting a domain can cause dom0 to balloon more than
necessary.
I changed the physinfo dictionary in Python to be in KiB, rather than
MiB, to avoid accumulating ugly rounding errors. I tried to avoid
changing units anywhere else.
Signed-off-by: Charles Coffing <ccoffing@novell.com>
[TPM] Fix an occasional problem when doing local migration due to the xenstore's
'instance' variable not being initialized at the time when it's driver
counterpart is accessed. That variable's content was used to initialize the
tpmif structure. Instead, now a pointer to the structure is passed whose
'instance' variable will be initialized before the domain is resumed.
[XEN][BUILD] Both ctags and etags support the -a (append) option, and
by removing the tags or TAGS file, and then running using the
-a option in conjunction with xargs a full list of tags will
be obtained, regardless of how many files there are.
I believe that the existing invocations of both etags and ctags are wrong:
* I don't think - is a vailid argument to etags
* xargs ctags does not handle the case where ctags is invoked
multiple times by xargs when there are too many files
to fit on one command line.
[TOOLS] Fix cm argument processing some more:
1. Remove has_long_option() and add arg_check_for_resource_list()
instead.
2. 'args' tells 'options' from 'params' by using gnu_getopt().
3. 'options' checks whether -l/--long option is specified.
4. If 'params' not given, print out 'No domain parameter given'
and usage.
5. If 'params' given multiple domains, print out
'No multiple domain parameters allowed' and usage.
6. Then it displays the resources as usual.
[HVM][VMX] Added flag_dr_dirty to hvm vcpu struct. If this flag is set,
save the debug registers, clear the flag, and remove guest access to
debug registers. Signed-off-by: George Dunlap <dunlapg@umich.edu> Signed-off-by: Nitin Kamble <nitin.a.kamble@intel.com>
[HVM][VMX] Added dr restore if breakpoints are enabled in guest dr7. Signed-off-by: George Dunlap <dunlapg@umich.edu> Signed-off-by: Nitin Kamble <nitin.a.kamble@intel.com>
Some fine-tuning in the virtual TPM scripts for hotpluging. The changes
enable a virtual TPM to save its state between reboots of the virtual
TPM implementation.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com> Signed-off-by: Vincent Scarlata <vincent.r.scarlata@intel.com>
[TOOLS] Make sure to explicitly close the connection if we're using HTTP/1.0. This
shouldn't be needed but it appears to be necessary as the Python client
just does a wfile.read() instead of only reading the reported Content-Length.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
[TOOLS] Fix pagetable-pinning loop in xc_linux_restore.
Previously it would not pin last PFN in physmap even if it was
a pagetable page. Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] localtime support for paravirtualized guests
It is quite minimal
in its approach, satisfying the purposes of the paravirtualized
NetWare operating system as well as any others that expect the time
base to be provided in localtime.
[IA64] stub to support dump_execution_state() on ia64
Also implement on_selected_cpus() for ia64. Signed-off-by: Alex Williamson <alex.williamson@hp.com>
[XEN] Xen always relinquishes VGA console to domain0 when domain0
starts to boot (previous behaviour looked for console=tty0 on
dom0's command line). To prevent this 'console=vga[keep]' must
be specified. Signed-off-by: Keir Fraser <keir@xensource.com>
Add new XENMEM_machphys_mapping to get info about location and
sizeof of the mach2phys table default mapping. Use this in Linux to
dynamically adapt the mfn_to_pfn() routine to undelrying hypervisor. Signed-off-by: Keir Fraser <keir@xensource.com>